<template>
  <div class="">
    <div class="z gonggao">
      <div class="gg-left">
        <div class="er-title">
          {{ this.$store.state.twoMenu.oneName }}
        </div>
        <div
          v-for="(item, index) in twoMenu"
          :key="index"
          :index="String(index)"
        >
          <div
            :class="[twoIndex == index ? 'er-menu er-menu-active' : 'er-menu']"
            @click="onClick(index, item.path)"
          >
            {{ item.label }}
          </div>
        </div>
      </div>
    </div>
    <div class="shuju"></div>
  </div>
</template>

<script>
import { mapGetters } from "vuex";

export default {
  name: "MyAsideTwo",
  computed: {
    ...mapGetters(["twoMenu", "twoIndex"])
  },
  methods: {
    // 方法
    onClick(index, path) {
      this.$store.commit("setTwoIndex", index);
      this.$router.push(path);
    }
  },
  mounted() {}
};
</script>

<style scoped></style>
